package com.linked.store.thing.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.linked.store.thing.bean.param.ThingPageParam;
import com.linked.store.thing.bean.po.ThingInfoPO;
import com.linked.store.thing.bean.vo.ThingInfoVO;
import com.linked.store.thing.bean.vo.ThingPageVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * @author :dbq
 * @date : 2023/3/17 14:04
 * @description : desc
 */
@Mapper
public interface IThingInfoMapper extends BaseMapper<ThingInfoPO> {
    List<ThingInfoVO> queryThingListByBoxId(@Param("boxId") String boxId);

    IPage<ThingPageVO> queryThingPage(@Param("param") ThingPageParam param);

    boolean reduceInventory(@Param("goodsVersionId") String goodsVersionId, @Param("goodsCount") int goodsCount);
}
